package com.sskj.one.proxy;


import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.one.bean.ProxyBean;
import com.sskj.one.bean.TeamLevelBean;
import com.sskj.one.presenter.BasePresenter;

import dagger.internal.InstanceFactory;

/**
 * @author Hey
 * Create at  2019/05/21
 */
class ProxyPresenter extends BasePresenter<ProxyFragment> {


    public void getProxyInfo(boolean showLoading, int p, int size) {
        httpService.getProxyInfo(p,size)
                .tag(this)
                .execute(new JsonCallBack<HttpData<ProxyBean>>(showLoading ? this : null) {
                    @Override
                    public void onHTTPSuccess(HttpData<ProxyBean> data) {
                        mView.getProxyBeanOK(data.getData());
                    }

                    @Override
                    public void onFinish() {
                        super.onFinish();
                        mView.stopRefresh();
                    }
                });

    }
}
